<?php

/*-----------------------------------------------------------------------------------*/
/* Theme Header Output - wp_head() */
/*-----------------------------------------------------------------------------------*/

// This sets up the styles selected from the options panel

if (!function_exists('siteoptions_wp_head')) {
	function siteoptions_wp_head() { 
		$shortname = "arc";
	    
	    //Default css
			
			echo '<link href="'. ARC_CSS . 'default.css' .'" rel="stylesheet" type="text/css" />'."\n";
			echo '<link href="'. get_template_directory_uri() . '/style.css' .'" rel="stylesheet" type="text/css" />'."\n"; 
			echo '<link rel="stylesheet" href="'. ARC_JS .'/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />'."\n";
			
		//Styles
	    if(!empty($_SESSION['c_scheme']))      
				$GLOBALS['main_stylesheet'] = $_SESSION['c_scheme'];
			else
				$GLOBALS['main_stylesheet'] = get_option('arc_main_scheme');
				
	        if($GLOBALS['main_stylesheet'] != '')
	               echo '<link href="'. ARC_CSS . $GLOBALS['main_stylesheet'] .'.css'.'" rel="stylesheet" type="text/css" />'."\n";
				   
			if($GLOBALS['main_stylesheet'] == '')
	               echo '<link href="'. ARC_CSS . 'default_light.css' .'" rel="stylesheet" type="text/css" />'."\n";          
	     }       
			
	}

add_action('wp_head', 'siteoptions_wp_head');



/*-----------------------------------------------------------------------------------*/
/* Custom CSS Output */
/*-----------------------------------------------------------------------------------*/



/*-----------------------------------------------------------------------------------*/
/* Add Favicon
/*-----------------------------------------------------------------------------------*/

function architec_favicon() {
	$GLOBALS['favicon'] = get_option('arc_favicon');
	          if($GLOBALS['favicon'] != '')
	        echo '<link rel="shortcut icon" href="'.  $GLOBALS['favicon'] .'"/>'."\n";
	    }

add_action('wp_head', 'architec_favicon');





/*-----------------------------------------------------------------------------------*/
/* Add analytics code to footer */
/*-----------------------------------------------------------------------------------*/

function architec_analytics(){
	
	$GLOBALS['google'] = get_option('arc_google_analytics');
	          if($GLOBALS['google'] != '')
		echo stripslashes($GLOBALS['google']) . "\n";
}
add_action('wp_footer','architec_analytics');


?>